<template>
  <div class="encryptfiles nodrag">
    <div class="record df record1">
      <div class="div1"></div>
      <div class="name">选择处理方式</div>
    </div>
    <div class="encryptfileslist">
      <div class="div1"></div>
      <div class="div2">应用加密（推荐：适用企业内部传输，更安全</div>
    </div>
    <div class="encryptfileslist">
      <div class="div1"></div>
      <div class="div2">密码加密（适用企业外部传输）</div>
    </div>
    <div class="record df record2">
      <div class="div1"></div>
      <div class="name">需处理文件</div>
    </div>
    <div
      class="encryptfilesadd"
      v-if="state == 0 && file == ''"
      @click="handleAdd"
    >
      +添加文件
    </div>
    <div
      class="encryptfilessc nodrag"
      v-if="state == 0"
      :class="file == '' ? 'encryptfilessc1' : ''"
      @click="handleOperate(1)"
    >
      生成加密文件
    </div>
    <div
      class="encryptfilessc nodrag"
      v-if="state == 1"
      @click="handleOperate(2)"
    >
      生成文件
    </div>
    <div class="encryptfilessc nodrag" v-if="state == 2" @click="handleDown">
      下载文件
    </div>
    <div class="downfile df" v-if="file !== '' && state == 0">
      <div class="downfilediv">
        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.EXLS
      </div>
      <img class="downfileimg" src="@/assets/img/filedel.png" alt="" />
    </div>
    <div class="downfile df" v-if="state !== 0">
      <div class="downfilediv">
        XXXXdXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.EXLS
      </div>
      <img class="downfileimg" src="@/assets/img/filedel.png" alt="" />
    </div>
    <div class="record df record2" v-if="state == 2">
      <div class="div1"></div>
      <div class="name">需处理文件</div>
    </div>
    <div class="filecopy df" v-if="state == 2">
      <div class="filecopydiv1">密钥：543fq@25</div>
      <div class="filecopydiv2 cp">复制密钥</div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      state: 0,
      input: "",
      file: "",
    };
  },
  created() {},
  methods: {
    skipurl(url, index) {
      Vue.prototype.push({
        path: url,
      });
      this.index = index;
    },
    handlesc() {
      console.log(this.input);
    },
    // 添加文件
    handleAdd() {
      this.file = "ddd";
    },
    handleOperate(state) {
      this.state = state;
    },
    // 下载文件
    handleDown(url) {},
  },
};
</script>

<style lang="less" scoped>
.encryptfiles {
  margin-top: 24px;
  position: relative;
  height: 640px;
  width: 1060px;
  .record1 {
    margin: 0 0 0 60px;
  }
  .record2 {
    margin: 80px 0 0 60px;
  }
  .encryptfileslist {
    display: flex;
    margin-left: 91px;
    margin-top: 36px;
    .div1 {
      width: 48px;
      height: 48px;
      background-image: url(@/assets/img/slected.png);
      background-size: cover;
    }
    .div2 {
      width: 420px;
      height: 20px;
      font-family: MicrosoftYaHeiLight;
      font-size: 20px;
      color: #262626;
      line-height: 20px;
      text-align: left;
      font-style: normal;
      margin: 11px 0 0 19px;
    }
  }
  .encryptfilesadd {
    width: 240px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border: 2px solid #595959;
    text-align: center;
    line-height: 44px;
    margin: 24px 0 0 72px;
    cursor: pointer;
    font-weight: bold;
    font-size: 24px;
    color: #262626;
  }

  .encryptfilessc {
    width: 320px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.15);
    border-radius: 40px;
    border: 4px solid #ffffff;
    text-align: center;
    line-height: 70px;
    /* margin: 79px 0 0 676px; */
    position: absolute;
    bottom: 120px;
    right: 64px;
    font-weight: bold;
    font-size: 32px;

    cursor: pointer;
  }

  .encryptfilessc1 {
    color: #bfbfbf;
  }

  .downfile {
    margin: 32px 0 0 88px;
    .downfilediv {
      width: 800px;
      height: 24px;
      font-family: MicrosoftYaHei;
      font-size: 20px;
      color: #262626;
      line-height: 24px;
      text-align: left;
      font-style: normal;
      margin-top: 8px;
    }

    .downfileimg {
      width: 40px;
      height: 40px;
    }
  }
}

.filecopy {
  margin: 12px 0 0 88px;
  .filecopydiv1 {
    width: 220px;
    height: 24px;
    font-family: MicrosoftYaHei;
    font-size: 24px;
    color: #262626;
    line-height: 24px;
    text-align: left;
    font-style: normal;
    margin-top: 10px;
  }

  .filecopydiv2 {
    width: 160px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border: 2px solid #595959;
    text-align: center;
    line-height: 44px;
    font-family: MicrosoftYaHei, MicrosoftYaHei;
    font-weight: bold;
    font-size: 24px;
    color: #262626;
  }
}
</style>